package com.it.selfAfter.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.it.selfAfter.entity.PrizeInfo;
import com.it.selfAfter.utils.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @Author: Coke
 * @DateTime: 2023/05/20/18:15
 * @注释: TODO
 **/
@Mapper
public interface PrizeInfoMapper extends BaseMapper<PrizeInfo> {
    
    @Select ("select * from prize_info where phone=#{phone}")
    PrizeInfo getPrizeInfo (@Param ("phone") String phone);
    
    @Update("update  prize_info set count = #{count} where phone=#{phone}")
    int updateCount (@Param ("phone") String phone,@Param ("count")  int count);
}
